package cn.itcast.es.repository;

import cn.itcast.es.pojo.Goods;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * 自定义接口,继承ElasticsearchRepository
 */
public interface GoodsRepository extends ElasticsearchRepository<Goods,Long> {
    /**
     * 自定义方法查询:根据方法名称查询
     * @param from
     * @param to
     * @return
     */
    List<Goods> findByPriceBetween(Double from, Double to);
}